package program.commands;

import item.*;

/**
 * A class for dealing with shoot-commands: (shoot).
 *
 */
public class Shoot extends BasicCommand {
	/**
	 * Initialise this new shoot-command with a line number.
	 *
	 */
	public Shoot(int lineNb) {
		super(lineNb);
	}
	
	/**
	 * Returns a textual representation of this shoot-command,
	 * formatted in accordance with its position in the program.
	 *
	 * @return	
	 *          | result == getIndentation(indentationLevel) + "(shoot)"
	 */
	@Override
	public String prettyFormat(int indentationLevel) {
		return getIndentation(indentationLevel) + "(shoot)";
	}
	
	/**
	 * Executes the shoot method on a given robot.
	 *
	 * @effect	The given robot uses his laser.
	 *                      | robot.shoot()
	 */
	@Override
	public void execute(Robot robot) throws IllegalArgumentException {
		super.execute(robot);
		robot.shoot();
	}
} 